#include <bits/stdc++.h>
#define LL long long
using namespace std;

LL read(){
    LL x = 0, f = 1; char ch = getchar();
    while(!isdigit(ch)){if(ch == '-')f = -1; ch = getchar();}
    while(isdigit(ch)){x = (x << 1) + (x << 3) + (ch ^ 48); ch = getchar();}
    return x * f;
}

const int maxn = 1e5 + 5;

int n; LL a[maxn];

int main(){
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    n = read();
    for(int i = 1; i <= n; i++) a[i] = read();
    sort(a + 1, a + 1 + n);
    int now = 1;
    for(int i = 1; i <= n; i++){
        if(a[i] > a[now]) now++;
    } cout << (n - now + 1);
    return 0;
}